﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using BCGC.BLL.Helper;
using BCGC.BLL.MarketPlace;

public partial class Admin_MarketPlace_add_marketplace : AdminBasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
       
    }

   
    
    protected void imbSave_Click(object sender, EventArgs e)
    {
        Market market = new Market();
        market.UserID = Convert.ToInt32(txtUserID.Text.Trim());
        market.Title = Server.HtmlEncode(txtTitle.Text.Trim());
        market.MarketContent = Server.HtmlEncode(fckContent.Value);
        market.Date = Convert.ToDateTime(txtDate.Text);
        market.ShowContactInfo = chkShowContactInfo.Checked;
        market.AdminComment = Server.HtmlEncode(fckAdminComment.Value);
        market.ContactInfo = Server.HtmlEncode(txtContactInfo.Text.Trim());
        market.IsActive = chkActive.Checked;
        if (market.Save())
        {
            uccResponse.SetSuccessMessage("MarketPlace successfuly saved");
        }
        else
        {
            uccResponse.SetFailMessage("Failed to save MarketPlace");
        }
    }
}
